KindEditor.ready(function(K) {
			var editor1 = K.create('textarea[name="content1"]', {
				cssPath : './editor/plugins/code/prettify.css',
				uploadJson : './editor/php/upload_json.php',
				fileManagerJson : './editor/php/file_manager_json.php',
				allowFileManager : true,
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
				}
			});
			prettyPrint();
		});
		KindEditor.ready(function(K) {
			var editor = K.editor({
				allowFileManager : true
			});
			K('#insertfile').click(function() {
				editor.loadPlugin('insertfile', function() {
					editor.plugin.fileDialog({
						fileUrl : K('#url').val(),
						clickFn : function(url, title) {
							K('#url').val(url);
							editor.hideDialog();
						}
					});
				});
			});
		});
		
		
		var  highlightcolor='#c0e8f1';
		//此处clickcolor只能用win系统颜色代码才能成功,如果用#xxxxxx的代码就不行,还没搞清楚为什么:(
		var  clickcolor='#51b2f6';
		function  changeto(){
		source=event.srcElement;
		if  (source.tagName=="TR"||source.tagName=="TABLE")
		return;
		while(source.tagName!="TD")
		source=source.parentElement;
		source=source.parentElement;
		cs  =  source.children;
		//alert(cs.length);
		if  (cs[1].style.backgroundColor!=highlightcolor&&source.id!="nc"&&cs[1].style.backgroundColor!=clickcolor)
		for(i=0;i<cs.length;i++){
			cs[i].style.backgroundColor=highlightcolor;
		}
		}

		function  changeback(){
		if  (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="nc")
		return
		if  (event.toElement!=source&&cs[1].style.backgroundColor!=clickcolor)
		//source.style.backgroundColor=originalcolor
		for(i=0;i<cs.length;i++){
			cs[i].style.backgroundColor="";
		}
		}

		function  clickto(){
		source=event.srcElement;
		if  (source.tagName=="TR"||source.tagName=="TABLE")
		return;
		while(source.tagName!="TD")
		source=source.parentElement;
		source=source.parentElement;
		cs  =  source.children;
		//alert(cs.length);
		if  (cs[1].style.backgroundColor!=clickcolor&&source.id!="nc")
		for(i=0;i<cs.length;i++){
			cs[i].style.backgroundColor=clickcolor;
		}
		else
		for(i=0;i<cs.length;i++){
			cs[i].style.backgroundColor="";
		}
		}
		function selectAll() {
			//document.title="为鹅鹅鹅";
			//alert("true");
			if($(":input.hhhh").attr("checked")==true){
				$(":input.STYLE2").attr("checked","true");
			}
			else{
				$(":input.STYLE2").attr("checked","");
			}
			//$(":input.STYLE2").attr("checked","true");
			//alert("ss");
		}
		function deleteSelect(what) {
			var count=0;
			for ( var int = 0; int < $(":input.STYLE2").size(); int++) {
				var temp = $(":input.STYLE2").get(int);
				if(temp.checked==true){
					count++;
				}	
			}
			var str="tableDelete.php"+what+"count=";
			str = str + count.toString();
			for ( var int = 0; int < $(":input.STYLE2").size(); int++) {
				var temp = $(":input.STYLE2").get(int);
				if(temp.checked==true){
					var intt = int+1;
					str = str + "&NID" + intt.toString() + "=" + temp.value;
					//alert(temp.value);
				}	
			}
			location.href=str;
		}
		
		function myde() {

			var count=0;
			for ( var int = 0; int < $(":input.STYLE2").size(); int++) {
				var temp = $(":input.STYLE2").get(int);
				if(temp.checked==true){
					count++;
				}	
			}
			var str="/admin/deleteusers?count=";
			str = str + count.toString();
			for ( var int = 0; int < $(":input.STYLE2").size(); int++) {
				var temp = $(":input.STYLE2").get(int);
				if(temp.checked==true){
					var intt = int+1;
					str = str + "&NID" + intt.toString() + "=" + temp.value;
					//alert(temp.value);
				}	
			}
			location.href=str;
			//alert(str);
		}
		
		
		function mydeteacher() {

			var count=0;
			for ( var int = 0; int < $(":input.STYLE2").size(); int++) {
				var temp = $(":input.STYLE2").get(int);
				if(temp.checked==true){
					count++;
				}	
			}
			var str="/admintables/deleteteachers?count=";
			str = str + count.toString();
			for ( var int = 0; int < $(":input.STYLE2").size(); int++) {
				var temp = $(":input.STYLE2").get(int);
				if(temp.checked==true){
					var intt = int+1;
					str = str + "&NID" + intt.toString() + "=" + temp.value;
					//alert(temp.value);
				}	
			}
			var ttt = $("#iinstType").val();
			//alert(ttt);
			location.href=str+'&ok=3&institudeId='+ttt;
			//alert(str);
		}
		function mydenews(){
			var count=0;
			
			for ( var int = 0; int < $(":input.STYLE2").size(); int++) {
				var temp = $(":input.STYLE2").get(int);
				if(temp.checked==true){
					count++;
				}	
			}
			var str="/admintables/deletenews?count=";
			str = str + count.toString();
			for ( var int = 0; int < $(":input.STYLE2").size(); int++) {
				var temp = $(":input.STYLE2").get(int);
				if(temp.checked==true){
					var intt = int+1;
					str = str + "&NID" + intt.toString() + "=" + temp.value;
					//alert(temp.value);
				}	
			}
			var ttt = $("#iinstType").val();
			location.href=str+'&ok=3&institudeId='+ttt;
		}
		
		
		//删除联合机构
		function mydeinstitution(){
			var count=0;
			for ( var int = 0; int < $(":input.STYLE2").size(); int++) {
				var temp = $(":input.STYLE2").get(int);
				if(temp.checked==true){
					count++;
				}	
			}
			var str="/baseinfo/deleteinstitution?count=";
			str = str + count.toString();
			for ( var int = 0; int < $(":input.STYLE2").size(); int++) {
				var temp = $(":input.STYLE2").get(int);
				if(temp.checked==true){
					var intt = int+1;
					str = str + "&NID" + intt.toString() + "=" + temp.value;
					//alert(temp.value);
				}	
			}
			location.href=str;
			//alert(str);
		}
		//删除链接
		function mydelink(){
			var count=0;
			for ( var int = 0; int < $(":input.STYLE2").size(); int++) {
				var temp = $(":input.STYLE2").get(int);
				if(temp.checked==true){
					count++;
				}	
			}
			
			var str="/baseinfo/deletelink?count=";
			str = str + count.toString();
			
			for ( var int = 0; int < $(":input.STYLE2").size(); int++) {
				var temp = $(":input.STYLE2").get(int);
				if(temp.checked==true){
					var intt = int+1;
					str = str + "&NID" + intt.toString() + "=" + temp.value;
					//alert(temp.value);
				}	
			}
			location.href=str;
//			alert(str);
		}
		
		//删除办事指南
		function mydeworkguide(){
			var count=0;
			for ( var int = 0; int < $(":input.STYLE2").size(); int++) {
				var temp = $(":input.STYLE2").get(int);
				if(temp.checked==true){
					count++;
				}	
			}
			
			var str="/baseinfo/deleteworkguide?count=";
			str = str + count.toString();
			
			for ( var int = 0; int < $(":input.STYLE2").size(); int++) {
				var temp = $(":input.STYLE2").get(int);
				if(temp.checked==true){
					var intt = int+1;
					str = str + "&NID" + intt.toString() + "=" + temp.value;
					//alert(temp.value);
				}	
			}
			location.href=str;
//			alert(str);
		}
		function mydeenroll(){
			var count=0;
			for ( var int = 0; int < $(":input.STYLE2").size(); int++) {
				var temp = $(":input.STYLE2").get(int);
				if(temp.checked==true){
					count++;
				}	
			}
			
			var str="/baseinfo/deleteenrollstudent?count=";
			str = str + count.toString();
			
			for ( var int = 0; int < $(":input.STYLE2").size(); int++) {
				var temp = $(":input.STYLE2").get(int);
				if(temp.checked==true){
					var intt = int+1;
					str = str + "&NID" + intt.toString() + "=" + temp.value;
					//alert(temp.value);
				}	
			}
			location.href=str;
		}
	    